/*
*Copyright © 2019 XSNOW
*四川瑞韬科技有限公司
*http://www.ratotech.com.cn
*All rights reserved.
*/

package com.icesoft.xsnow.upms.api.po;

import com.baomidou.mybatisplus.annotation.*;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.icesoft.xsnow.framework.api.po.NormalEntity;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;

import java.time.LocalDateTime;

/**
 * @program: xsnow
 * @description: 角色表 实体类
 * @author xuefeng.gao
 * @create: 2019-05-27
 */
@Data
@EqualsAndHashCode(callSuper = true)
@ApiModel(description = "角色表")
@TableName("sys_role")
public class SysRole extends NormalEntity{
private static final long serialVersionUID = 1L;

  @TableId(type = IdType.AUTO)
  protected Integer id;
  @ApiModelProperty(notes = "父角色")
  private Long parentId;
  @ApiModelProperty(notes = "角色名称")
  private String name;
  @ApiModelProperty(notes = "角色英文名称")
  private String enname;
  @ApiModelProperty(notes = "备注")
  private String description;

  /**
   * 创建时间
   */
  @TableField(fill = FieldFill.INSERT)
  @JsonFormat(shape = JsonFormat.Shape.STRING, pattern="yyyy-MM-dd HH:mm:ss")
  protected LocalDateTime createDate;

  /**
   * 修改时间
   */
  @TableField(fill = FieldFill.INSERT_UPDATE)
  @JsonFormat(shape = JsonFormat.Shape.STRING, pattern="yyyy-MM-dd HH:mm:ss")
  protected LocalDateTime updateDate;

  /**
   * 创建者ID
   */
  @TableField(fill = FieldFill.INSERT)
  private Integer createUid;

}
